<div class="xxSort">
    <div class="item">
        <ul class="sortul">
            <li>分类：</li>
            <li <?php if (empty($pid)) {
                echo 'class="sour"';
            } ?>>
                <a href="<?php echo $config['cfg_basehost'] . 'wap/list/' . "0-".$cid."-".$area."-".$m1."-".$m2 .".html" ;?>">全部</a>
            </li>
            <?php
            $secondCategory = 0;
            foreach ($category as $k => $v) {  ?>

                <?php if ($v['pid'] == 0) { ?>
                    <li
                        <?php if ((int)$pid == (int)$v['id']) {
                            echo 'class="sour"';
                        } ?>
                    >
                        <a href="<?php echo $config['cfg_basehost'] . 'wap/list/' . $v['id'] . "-".$cid."-".$area."-".$m1."-".$m2 .".html" ;?>"><?php echo $v['category']; ?></a>
                    </li>
                <?php }else{
                    $secondCategory ++;
                } ?>
            <?php } ?>
        </ul>
        <div class="clear"></div>
    </div>

    <div class="item">
        <ul class="sortul">
            <li>详细：</li>
            <li <?php $secondCategory = 0; if ((int)($cid) == 0) {
                echo 'class="sour"';
            } ?>>
                <a href="<?php echo $config['cfg_basehost'] . 'wap/list/' . $pid."-0-".$area."-".$m1."-".$m2 .".html" ;?>">全部</a>
            </li>
            <?php foreach ($category as $k => $v) { ?>
                <?php if ((int)$v['pid'] != 0) { ?>
                    <li <?php if ( (int)$cid === (int)$v['id']) {
                        echo 'class="sour"';
                        echo "data-id=".$cid."-".$v['id'];
                    } ?>>

                        <a href="<?php echo $config['cfg_basehost'] . 'wap/list/' . $pid."-".$v['id']."-".$area."-".$m1."-".$m2 .".html" ;?>"><?php echo $v['category']; ?></a>
                    </li>
                <?php } ?>
            <?php } ?>
        </ul>
        <div class="clear"></div>
    </div>

    <div class="item">
        <ul class="sortul">
            <li>地区：</li>
            <li <?php if ((int)$area == 0) {
                echo 'class="sour"';
            } ?>>

                <a href="<?php echo $config['cfg_basehost'] . 'wap/list/' . $pid."-".$cid."-0-".$m1."-".$m2 .".html" ;?>">全部</a>
            </li>
            <?php foreach (C('city_area') as $k => $v) { ?>
                <li <?php if ((int)$area >= 0 && (int)$area === (int)$k) {
                    echo 'class="sour"';
                } ?>>

                    <a href="<?php echo $config['cfg_basehost'] . 'wap/list/' . $pid."-".$cid."-".$k."-".$m1."-".$m2 .".html" ;?>"><?php echo $v; ?></a>
                </li>
            <?php } ?>
        </ul>
        <div class="clear"></div>
    </div>

</div>

<div id="messlist" class="m">

    <?php foreach($data as $k => $v){ ?>
    <div class="wapBox">
        <?php if($v['status'] == 2){ ?>
            <div class="wbding">置顶</div>
        <?php } ?>
        <a href="{$config['cfg_basehost']}wap/xinxi-{$v.id}.html" class="wbt"><?php echo $v['title']; ?></a><span class="wbp"></span>
        <div class="c" onclick="window.location.href='{$config['cfg_basehost']}wap/xinxi-{$v.id}.html'">
            <?php echo strip_tags(mb_substr($v['content'],0,100),''); ?>
        </div>
        <?php if(!empty($v['phone'])){?>
        <div class="c">手机：<?php echo $v['phone'];?>
            <div class="wcb">
                <a href="tel:<?php echo $v['phone'];?>" class="wbbd">拨打</a><a href="sms:<?php echo $v['phone'];?>" class="wbdx">短信</a>
            </div>
        </div>
        <?php } ?>
        <div class="wbd">(<?php echo $allCategory[$v['cid']]; ?>/有效期<?php $days = ceil((strtotime($v['valid_date']) - time()) / 86400);
            if ($days > 0) {
                echo (int)$days . '天';
            } else {
                echo $v['valid_date'];
            } ?><span class="boxConsole" id="bcl<?php echo $v['id'];?>">)</div>
    </div>
    <?php } ?>

    <div class="clear"></div>
</div>
<ul id="pagelist" class="pagelist p">
    {$pageShow}
</ul>
<div class="clear"></div>